package com.nix.web.databases.service.word;

import com.nix.web.databases.mapper.word.CategoryMapper;
import com.nix.web.databases.pojo.word.Category;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Create by zhangpe0312@qq.com on 2018/1/3.
 */
@Service
public class CategoryService implements CategoryMapper{

    @Autowired
    private CategoryMapper categoryMapper;

    @Override
    public Category selectByName(String mark) throws Exception{
        return categoryMapper.selectByName(mark);
    }

    @Override
    public boolean add(Category category) throws Exception {
        return categoryMapper.add(category);
    }

    @Override
    public boolean delete(Integer id) throws Exception {
        return categoryMapper.delete(id);
    }

    @Override
    public boolean update(Category category) throws Exception {
        return categoryMapper.update(category);
    }

    @Override
    public Category select(Integer id) throws Exception {
        return categoryMapper.select(id);
    }
}
